Optimal. Leaf size=309 \[ \frac {2 C \sqrt {-d e+c f} \sqrt {\frac {d (e+f x)}{d e-c f}} \sqrt {\frac {d (g+h x)}{d g-c h}} F\left (\sin ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {-d e+c f}}\right )|\frac {(d e-c f) h}{f (d g-c h)}\right )}{d \sqrt {f} \sqrt {e+f x} \sqrt {g+h x}}-\frac {2 (b B-2 a C) \sqrt {-d e+c f} \sqrt {\frac {d (e+f x)}{d e-c f}} \sqrt {\frac {d (g+h x)}{d g-c h}} \Pi \left (-\frac {b (d e-c f)}{(b c-a d) f};\sin ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {-d e+c f}}\right )|\frac {(d e-c f) h}{f (d g-c h)}\right )}{(b c-a d) \sqrt {f} \sqrt {e+f x} \sqrt {g+h x}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.53, antiderivative size = 309, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 8, integrand size = 60, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {24, 1621, 175,
552, 551, 12, 122, 121} \begin {gather*} \frac {2 C \sqrt {c f-d e} \sqrt {\frac {d (e+f x)}{d e-c f}} \sqrt {\frac {d (g+h x)}{d g-c h}} F\left (\text {ArcSin}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {c f-d e}}\right )|\frac {(d e-c f) h}{f (d g-c h)}\right )}{d \sqrt {f} \sqrt {e+f x} \sqrt {g+h x}}-\frac {2 (b B-2 a C) \sqrt {c f-d e} \sqrt {\frac {d (e+f x)}{d e-c f}} \sqrt {\frac {d (g+h x)}{d g-c h}} \Pi \left (-\frac {b (d e-c f)}{(b c-a d) f};\text {ArcSin}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {c f-d e}}\right )|\frac {(d e-c f) h}{f (d g-c h)}\right )}{\sqrt {f} \sqrt {e+f x} \sqrt {g+h x} (b c-a d)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 24
Rule 121
Rule 122
Rule 175
Rule 551
Rule 552
Rule 1621
Rubi steps
\begin {align*} \int \frac {a b B-a^2 C+b^2 B x+b^2 C x^2}{(a+b x)^2 \sqrt {c+d x} \sqrt {e+f x} \sqrt {g+h x}} \, dx &=\frac {\int \frac {b^2 (b B-a C)+b^3 C x}{(a+b x) \sqrt {c+d x} \sqrt {e+f x} \sqrt {g+h x}} \, dx}{b^2}\\ &=\frac {\int \frac {b^2 C}{\sqrt {c+d x} \sqrt {e+f x} \sqrt {g+h x}} \, dx}{b^2}+(b B-2 a C) \int \frac {1}{(a+b x) \sqrt {c+d x} \sqrt {e+f x} \sqrt {g+h x}} \, dx\\ &=C \int \frac {1}{\sqrt {c+d x} \sqrt {e+f x} \sqrt {g+h x}} \, dx-(2 (b B-2 a C)) \text {Subst}\left (\int \frac {1}{\left (b c-a d-b x^2\right ) \sqrt {e-\frac {c f}{d}+\frac {f x^2}{d}} \sqrt {g-\frac {c h}{d}+\frac {h x^2}{d}}} \, dx,x,\sqrt {c+d x}\right )\\ &=\frac {\left (C \sqrt {\frac {d (e+f x)}{d e-c f}}\right ) \int \frac {1}{\sqrt {c+d x} \sqrt {\frac {d e}{d e-c f}+\frac {d f x}{d e-c f}} \sqrt {g+h x}} \, dx}{\sqrt {e+f x}}-\frac {\left (2 (b B-2 a C) \sqrt {\frac {d (e+f x)}{d e-c f}}\right ) \text {Subst}\left (\int \frac {1}{\left (b c-a d-b x^2\right ) \sqrt {1+\frac {f x^2}{d \left (e-\frac {c f}{d}\right )}} \sqrt {g-\frac {c h}{d}+\frac {h x^2}{d}}} \, dx,x,\sqrt {c+d x}\right )}{\sqrt {e+f x}}\\ &=\frac {\left (C \sqrt {\frac {d (e+f x)}{d e-c f}} \sqrt {\frac {d (g+h x)}{d g-c h}}\right ) \int \frac {1}{\sqrt {c+d x} \sqrt {\frac {d e}{d e-c f}+\frac {d f x}{d e-c f}} \sqrt {\frac {d g}{d g-c h}+\frac {d h x}{d g-c h}}} \, dx}{\sqrt {e+f x} \sqrt {g+h x}}-\frac {\left (2 (b B-2 a C) \sqrt {\frac {d (e+f x)}{d e-c f}} \sqrt {\frac {d (g+h x)}{d g-c h}}\right ) \text {Subst}\left (\int \frac {1}{\left (b c-a d-b x^2\right ) \sqrt {1+\frac {f x^2}{d \left (e-\frac {c f}{d}\right )}} \sqrt {1+\frac {h x^2}{d \left (g-\frac {c h}{d}\right )}}} \, dx,x,\sqrt {c+d x}\right )}{\sqrt {e+f x} \sqrt {g+h x}}\\ &=\frac {2 C \sqrt {-d e+c f} \sqrt {\frac {d (e+f x)}{d e-c f}} \sqrt {\frac {d (g+h x)}{d g-c h}} F\left (\sin ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {-d e+c f}}\right )|\frac {(d e-c f) h}{f (d g-c h)}\right )}{d \sqrt {f} \sqrt {e+f x} \sqrt {g+h x}}-\frac {2 (b B-2 a C) \sqrt {-d e+c f} \sqrt {\frac {d (e+f x)}{d e-c f}} \sqrt {\frac {d (g+h x)}{d g-c h}} \Pi \left (-\frac {b (d e-c f)}{(b c-a d) f};\sin ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {-d e+c f}}\right )|\frac {(d e-c f) h}{f (d g-c h)}\right )}{(b c-a d) \sqrt {f} \sqrt {e+f x} \sqrt {g+h x}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 20.97, size = 249, normalized size = 0.81 \begin {gather*} \frac {2 i \sqrt {e+f x} \sqrt {\frac {d (g+h x)}{h (c+d x)}} \left (-\left ((b c C-b B d+a C d) F\left (i \sinh ^{-1}\left (\frac {\sqrt {-c+\frac {d e}{f}}}{\sqrt {c+d x}}\right )|\frac {d f g-c f h}{d e h-c f h}\right )\right )+(-b B+2 a C) d \Pi \left (-\frac {b c f-a d f}{b d e-b c f};i \sinh ^{-1}\left (\frac {\sqrt {-c+\frac {d e}{f}}}{\sqrt {c+d x}}\right )|\frac {d f g-c f h}{d e h-c f h}\right )\right )}{(-b c+a d) \sqrt {-c+\frac {d e}{f}} f \sqrt {\frac {d (e+f x)}{f (c+d x)}} \sqrt {g+h x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(665\) vs.
\(2(275)=550\).
time = 0.12, size = 666, normalized size = 2.16
method | result | size |
elliptic | \(\frac {\sqrt {\left (d x +c \right ) \left (f x +e \right ) \left (h x +g \right )}\, \left (\frac {2 C \left (-\frac {e}{f}+\frac {g}{h}\right ) \sqrt {\frac {x +\frac {g}{h}}{-\frac {e}{f}+\frac {g}{h}}}\, \sqrt {\frac {x +\frac {c}{d}}{-\frac {g}{h}+\frac {c}{d}}}\, \sqrt {\frac {x +\frac {e}{f}}{-\frac {g}{h}+\frac {e}{f}}}\, \EllipticF \left (\sqrt {\frac {x +\frac {g}{h}}{-\frac {e}{f}+\frac {g}{h}}}, \sqrt {\frac {-\frac {g}{h}+\frac {e}{f}}{-\frac {g}{h}+\frac {c}{d}}}\right )}{\sqrt {d f h \,x^{3}+c f h \,x^{2}+d e h \,x^{2}+d f g \,x^{2}+c e h x +c f g x +d e g x +c e g}}+\frac {2 \left (B b -2 a C \right ) \left (-\frac {e}{f}+\frac {g}{h}\right ) \sqrt {\frac {x +\frac {g}{h}}{-\frac {e}{f}+\frac {g}{h}}}\, \sqrt {\frac {x +\frac {c}{d}}{-\frac {g}{h}+\frac {c}{d}}}\, \sqrt {\frac {x +\frac {e}{f}}{-\frac {g}{h}+\frac {e}{f}}}\, \EllipticPi \left (\sqrt {\frac {x +\frac {g}{h}}{-\frac {e}{f}+\frac {g}{h}}}, \frac {-\frac {g}{h}+\frac {e}{f}}{-\frac {g}{h}+\frac {a}{b}}, \sqrt {\frac {-\frac {g}{h}+\frac {e}{f}}{-\frac {g}{h}+\frac {c}{d}}}\right )}{b \sqrt {d f h \,x^{3}+c f h \,x^{2}+d e h \,x^{2}+d f g \,x^{2}+c e h x +c f g x +d e g x +c e g}\, \left (-\frac {g}{h}+\frac {a}{b}\right )}\right )}{\sqrt {d x +c}\, \sqrt {f x +e}\, \sqrt {h x +g}}\) | \(475\) |
default | \(-\frac {2 \sqrt {h x +g}\, \sqrt {f x +e}\, \sqrt {d x +c}\, \sqrt {-\frac {\left (h x +g \right ) f}{e h -f g}}\, \sqrt {\frac {\left (d x +c \right ) h}{c h -d g}}\, \sqrt {\frac {\left (f x +e \right ) h}{e h -f g}}\, \left (B \EllipticPi \left (\sqrt {-\frac {\left (h x +g \right ) f}{e h -f g}}, \frac {\left (e h -f g \right ) b}{f \left (a h -b g \right )}, \sqrt {\frac {\left (e h -f g \right ) d}{f \left (c h -d g \right )}}\right ) b e \,h^{2}-B \EllipticPi \left (\sqrt {-\frac {\left (h x +g \right ) f}{e h -f g}}, \frac {\left (e h -f g \right ) b}{f \left (a h -b g \right )}, \sqrt {\frac {\left (e h -f g \right ) d}{f \left (c h -d g \right )}}\right ) b f g h +C \EllipticF \left (\sqrt {-\frac {\left (h x +g \right ) f}{e h -f g}}, \sqrt {\frac {\left (e h -f g \right ) d}{f \left (c h -d g \right )}}\right ) a e \,h^{2}-C \EllipticF \left (\sqrt {-\frac {\left (h x +g \right ) f}{e h -f g}}, \sqrt {\frac {\left (e h -f g \right ) d}{f \left (c h -d g \right )}}\right ) a f g h -C \EllipticF \left (\sqrt {-\frac {\left (h x +g \right ) f}{e h -f g}}, \sqrt {\frac {\left (e h -f g \right ) d}{f \left (c h -d g \right )}}\right ) b e g h +C \EllipticF \left (\sqrt {-\frac {\left (h x +g \right ) f}{e h -f g}}, \sqrt {\frac {\left (e h -f g \right ) d}{f \left (c h -d g \right )}}\right ) b f \,g^{2}-2 C \EllipticPi \left (\sqrt {-\frac {\left (h x +g \right ) f}{e h -f g}}, \frac {\left (e h -f g \right ) b}{f \left (a h -b g \right )}, \sqrt {\frac {\left (e h -f g \right ) d}{f \left (c h -d g \right )}}\right ) a e \,h^{2}+2 C \EllipticPi \left (\sqrt {-\frac {\left (h x +g \right ) f}{e h -f g}}, \frac {\left (e h -f g \right ) b}{f \left (a h -b g \right )}, \sqrt {\frac {\left (e h -f g \right ) d}{f \left (c h -d g \right )}}\right ) a f g h \right )}{f h \left (a h -b g \right ) \left (d f h \,x^{3}+c f h \,x^{2}+d e h \,x^{2}+d f g \,x^{2}+c e h x +c f g x +d e g x +c e g \right )}\) | \(666\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {-C\,a^2+B\,a\,b+C\,b^2\,x^2+B\,b^2\,x}{\sqrt {e+f\,x}\,\sqrt {g+h\,x}\,{\left (a+b\,x\right )}^2\,\sqrt {c+d\,x}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________